<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>BLOGGER - Knowledge Base</title>
  <style type="text/css">@import url("http://help.blogger.com/img/blg/css/help.css");</style>
  <link rel="stylesheet" type="text/css" href="http://help.blogger.com/img/blg/css/help-simple.css" />
</head>
<body>
<!-- BLOGGER HEADER -->
<div id="header">
  <a href="http://www.blogger.com/"><img src="http://new.blogger.com/images/logo-32x32.gif" width="32" height="32" alt="BLOGGER" align="middle" border="0" hspace="5" vspace="5" id="logo" /></a>&nbsp;<img src="http://new.blogger.com/images/hdr-blogger-white.gif" width="137" height="28" alt="BLOGGER" align="middle" id="logoType" border="0" />
</div>
<div id="nav">
	Back To: <a href="/">Knowledge Base</a>&nbsp;&gt;&nbsp;<a href="/bin/topic.py?topic=14">Working with Blogger</a>&nbsp;&gt;&nbsp;<a href="/bin/topic.py?topic=22">Templates</a>
</div>
<div id="mainClm">
<h1>What do Blogger's template tags do?</h1>
</p>
<!-- ANSWER -->
<h2>Answer:</h2>
<div id="answer">The <code>&lt;Blogger&gt;</code> tags are called meta tags, because they represent data stored in the Blogger database about your blog. For example, <code>&lt;BlogItemAuthorEmail&gt;</code> is the email address of the author of a post, as stored in the <a href="http://help.blogger.com/bin/answer.py?answer=58&topic=18">Profile Editor</a>. The following is a list of the Blogger meta tags (good for copying & pasting when template hacking!):
<pre>
&lt;$BlogEncoding$&gt;

&lt;BlogSiteFeed&gt;
   &lt;$BlogSiteFeedUrl$&gt;
&lt;/BlogSiteFeed&gt;

&lt;$BlogOwnerFirstName$&gt;
&lt;$BlogOwnerLastName$&gt;
&lt;$BlogOwnerEmail$&gt;
&lt;$BlogOwnerFullName$&gt;
&lt;$BlogOwnerPhone$&gt;

&lt;Blogger&gt;
   &lt;BlogDateHeader&gt;
      &lt;$BlogDateHeaderDate$&gt;
   &lt;/BlogDateHeader&gt;

   &lt;BlogItemTitle&gt;
      &lt;$BlogItemTitle$&gt;
   &lt;/BlogItemTitle&gt;

   &lt;$BlogItemBody$&gt;
   &lt;$BlogItemAuthor$&gt;
   &lt;$BlogItemAuthorNickname$&gt;
   &lt;$BlogItemAuthorEmail$&gt;
   &lt;$BlogItemAuthorURL$&gt;
   &lt;$BlogItemDateTime$&gt;
   &lt;$BlogItemNumber$&gt;
   &lt;$BlogItemArchiveFileName$&gt;
   &lt;$BlogItemPermalinkURL$&gt;   

   &lt;BlogDateFooter&gt;
   &lt;/BlogDateFooter&gt;
&lt;/Blogger&gt;

&lt;BloggerArchives&gt;
   &lt;$BlogArchiveURL$&gt;
   &lt;$BlogArchiveName$&gt;
&lt;/BloggerArchives&gt;
</pre>
As you can see, it looks a lot like HTML. One difference between these tags and HTML is that <em>case is important</em>.
<br /><br />
<strong>Blogger tags, defined:</strong>
<ul>
<li><code>&lt;$BlogTitle$&gt;</code> - The title of the blog.</li>
<li><code>&lt;$BlogDescription$&gt;</code> - A description of the blog.</li>
<li><code>&lt;$BlogItemBody$&gt;</code> - The text of a post.</li>
<li><code>&lt;$BlogItemAuthor$&gt;</code> - The author of a post.</li>
<li><code>&lt;$BlogItemAuthorNickname$&gt;</code> - The nickname of the author of a post.</li>
<li><code>&lt;$BlogItemAuthorEmail$&gt;</code> - The email address of the author of a post.</li>
<li><code>&lt;$BlogItemAuthorURL$&gt;</code> - The homepage URL of the author of a post.</li>
<li><code>&lt;$BlogItemDateTime$&gt;</code> - The Date and/or Time of a post.</li>
<li><code>&lt;$BlogItemNumber$&gt;</code> - The unique ID number of the post.</li>
<li><code>&lt;$BlogItemArchiveFileName$&gt;</code> - The archive filename of the post</li>
<li><code>&lt;$BlogItemPermalinkURL$&gt;</code> - The <a href="http://help.blogger.com/bin/answer.py?answer=119&topic=0">permalink</a> of the post</li>
</ul>
<strong>Date Header</strong><br />
The code between the &lt;BlogDateHeader&gt; tags work a little differently. This code is used to group posts together under a common date heading. It is only used when the date <em>changes</em>. This code:<pre>
&lt;Blogger&gt;
   &lt;BlogDateHeader&gt;
      &lt;h4&gt;&lt;$BlogDateHeaderDate$&gt;&lt;/h4&gt;
   &lt;/BlogDateHeader&gt;
   &lt;$BlogItemBody$&gt;&lt;br /&gt;
   &lt;small&gt;posted by &lt;$BlogItemAuthorNickname$&gt; on &lt;$BlogItemDateTime$&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;
&lt;/Blogger&gt;
</pre>
would produce this on your blog:
<blockquote>
<h4>Thursday, July 17, 2003</h4>Hi, this is my third Blogger post.<br />
<small>posted by EBC on 7/17/2003 2:04pm</small><br /><br />
Blogger's pretty cool!<br />
<small>posted by EBC on 7/17/2003 1:37pm</small><br /><br />
<h4>Wednesday, July 16, 2003</h4>Does this thing work?<br />
<small>posted by EBC on 7/16/2003 9:38am</small><br />
</blockquote>
<strong>Titles</strong><br />
For information on how to use the &lt;BlogItemTitle&gt; tags, please see this <a href="http://help.blogger.com/bin/answer.py?answer=113&topic=0">article</a>.<br /><br />
<strong>Date Footer</strong><br />
This works the same way as the Date Header, but there are no value tags associated with it. Here's the example from above with an added footer:
<pre>
&lt;Blogger&gt;
   &lt;BlogDateHeader&gt;
      &lt;h4&gt;&lt;$BlogDateHeaderDate$&gt;&lt;/h4&gt;
   &lt;/BlogDateHeader&gt;
   &lt;$BlogItemBody$&gt;&lt;br /&gt;
   &lt;small&gt;posted by &lt;$BlogItemAuthorNickname$&gt; on &lt;$BlogItemDateTime$&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;
   &lt;BlogDateFooter&gt;
   --------------------
   &lt;/BlogDateFooter&gt;
&lt;/Blogger&gt;
</pre>
would produce this on your blog:
<blockquote>
<h4>Thursday, July 17, 2003</h4>Hi, this is my third Blogger post.<br />
<small>posted by EBC on 7/17/2003 2:04pm</small><br />
--------------------<br /><br />
Blogger's pretty cool!<br />
<small>posted by EBC on 7/17/2003 1:37pm</small><br />
--------------------<br /><br />
<h4>Wednesday, July 16, 2003</h4>Does this thing work?<br />
<small>posted by EBC on 7/16/2003 9:38am</small><br />
--------------------<br /><br />
</blockquote>
<strong>New Template Tags</strong><br />
<ul>
<li>Archives: You can now include your archive listing on the main page of your blog without resorting to messy javascript. For example:
<pre>
&lt;BloggerArchives&gt;
  &lt;a href='&lt;$BlogArchiveURL$&gt;'&gt;&lt;$BlogArchiveName$&gt;&lt;/a&gt;
&lt;/BloggerArchives&gt;
</pre></li>
<li>Site Feed: Including these tags in the header of your template will allow the RSS feed for your blog to be auto-discovered by supporting aggregators. Example:
<pre>
&lt;BlogSiteFeed&gt;
  &lt;link rel="alternate" type="application/rss+xml" title="RSS" href="&lt;$BlogSiteFeedUrl$&gt;" /&gt;
&lt;/BlogSiteFeed&gt;
</pre>
</li>
<li>Blog Owner Tags: We've introduced tags for to include elements of the blog owner's user profile in your template. They are:
<pre>
&lt;$BlogOwnerFirstName$&gt;
&lt;$BlogOwnerLastName$&gt;
&lt;$BlogOwnerEmail$&gt;
&lt;$BlogOwnerFullName$&gt;
&lt;$BlogOwnerPhone$&gt;
</pre></li>
<li>Encoding Tag: This tag picks up the encoding setting from the Formatting tab and is to be used in a content-type declaration. Specifically:
<pre>&lt;meta http-equiv="Content-Type" content="text/html; charset=&lt;$BlogEncoding$&gt;" /&gt;</pre>
</li>
</ul>
</div>
<!-- SEARCH -->
<form name="search" method="get" action="/bin/search.py">
<input type="hidden" name="type" value="f" />
<hr />
<h2>Search:</h2>
<p><span class="description">In...</span><br />
  <select name="topic" id="topic" style="width:30%">
  <option value="0">- All Topics -</option>
	 <option value="12" >Advanced Use</option>
	 <option value="13" >Blogger Basics</option>
	 <option value="14" >Working with Blogger</option>
	 <option value="15" >Blogger Upgrades</option>
  </select>
</p>
<p>
<span class="description">For answers containing...</span><br />
<input size="40" type="text" name="query" id="query" value="" class="field" style="width:30em;" />
<br>
<input type="submit" name="Action.Search" value="&nbsp;&nbsp;&nbsp;Search&nbsp;&nbsp;&nbsp;" class="next" />
</p>
</form>
<!-- CONTROL LINK -->
<hr />
<p id="footer">If you cannot find what you're looking for, <a href="http://new.blogger.com/user_problem_new.pyra">please ask us</a>.</p>
</div>
<p>&nbsp;</p>
</body>
</html>
<!-- 0.021:0 -->
